package cn.sumpu.app.guoguojie.constant;

import java.util.HashMap;
import java.util.Map;

public enum WeiboType {
    SINA("01", "新浪微博"), TENCENT("03", "腾讯微博");

    private String value;
    private String label;

    private WeiboType(String value, String label) {
        this.value = value;
        this.label = label;
    }
    private static Map<String,String> cache;
    
    static {
        cache = new HashMap<String,String>();
        cache.put(SINA.getValue(), SINA.getLabel());
        cache.put(TENCENT.getValue(), TENCENT.getLabel());
    }
    
    public String getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }
    
    public static String getLabelByValue(String value) {
        return cache.get(value);
    }
    
}
